package com.example.onlineeducation.mapper

import com.example.onlineeducation.data.entity.OfflineStudyReplaceSignListEntity
import com.example.onlineeducation.data.json.ReplaceSignListJson
import com.yc.jetpacklib.extension.ycToNoEmpty
import com.yc.jetpacklib.mapper.IMapper


class OfflineStudyReplaceSignListMapper : IMapper<List<ReplaceSignListJson>?, List<OfflineStudyReplaceSignListEntity>?> {
    override fun map(input: List<ReplaceSignListJson>?): List<OfflineStudyReplaceSignListEntity>? {
        return input?.map {
            OfflineStudyReplaceSignListEntity(
                it.personId.ycToNoEmpty(),
                it.personInfo?.faceUrl.ycToNoEmpty(),
                it.personInfo?.name.ycToNoEmpty(),
                it.signInTime.ycToNoEmpty(),
                it.signOutTime.ycToNoEmpty(),
                it.replaceRemark.ycToNoEmpty()
            )
        }
    }
}

